ostree.git
5 months agoMerge pull request #3527 from alexlarsson/fix-sign-bindings
Colin Walters [Fri, 26 Sep 2025 15:10:23 +0000 (11:10 -0400)]
Merge pull request #3527 from alexlarsson/fix-sign-bindings

Fix various things around signatures and their use in rust

5 months agorust: Regenerate and release 0.20.5
Alexander Larsson [Fri, 26 Sep 2025 13:37:50 +0000 (15:37 +0200)]
rust: Regenerate and release 0.20.5

This adds the new bindings for signing and composefs use.

5 months agorust-binding: Extend bindings to support composefs and signing
Alexander Larsson [Fri, 26 Sep 2025 08:02:59 +0000 (10:02 +0200)]
rust-binding: Extend bindings to support composefs and signing

This adds GLib.VariantDict, which is needed for
ostree_repo_commit_add_composefs_metadata(), and OSTree.BlobReader
which are needed for ostree_sign_read_sk().

With these we can sign ostree commits with composefs digests in them.

5 months agogir: Add (nullable) to ostree_blob_reader_read_blob return value
Alexander Larsson [Fri, 26 Sep 2025 11:24:41 +0000 (13:24 +0200)]
gir: Add (nullable) to ostree_blob_reader_read_blob return value

This adds api docs to ostree_blob_reader_read_blob() so that we
can mark the return value as nullable. This is needed, because
this function can return NULL without setting error, and this
needs to be handled in bindings (such as the rust ones).

5 months agoostree-sign.ed25519/spki: Fix double free in set_sk()
Alexander Larsson [Fri, 26 Sep 2025 13:12:16 +0000 (15:12 +0200)]
ostree-sign.ed25519/spki: Fix double free in set_sk()

When the gvariant is G_VARIANT_TYPE_BYTESTRING we need to duplicate
the data we get from g_variant_get_fixed_array(), otherwise we will
double-free it when we later free sign->secret_key.

5 months agoMerge pull request #3526 from lcook/status-index-json
Colin Walters [Sat, 20 Sep 2025 17:46:10 +0000 (13:46 -0400)]
Merge pull request #3526 from lcook/status-index-json

status: Include deployment index in JSON output

5 months agostatus: Include deployment index in JSON output
Lewis Cook [Sat, 20 Sep 2025 08:55:49 +0000 (09:55 +0100)]
status: Include deployment index in JSON output

5 months agoMerge pull request #3523 from alexlarsson/signed-composefs-with-bootc
Colin Walters [Thu, 18 Sep 2025 18:38:54 +0000 (14:38 -0400)]
Merge pull request #3523 from alexlarsson/signed-composefs-with-bootc

Support using composefs signatures also with bootc commits

5 months agoSupport using composefs signatures also with bootc commits
Alexander Larsson [Mon, 15 Sep 2025 09:33:16 +0000 (11:33 +0200)]
Support using composefs signatures also with bootc commits

When using bootc, if you convert a signed ostree commit into an OCI
image `rpm-ostree compose container-encapsulate` you end up with a new
commit that isn't signed. However, the base commit object, and its
commitmeta are still in the image and will end up the repo, and
since https://github.com/bootc-dev/bootc/pull/1600 the base commit
id is available as the parent commit.

So, we change ostree-prepare-root to fall back to using the base
commit+commitmeta to find the expected composefs digest if the main
commit is not signed.

Note: This will only work with ostree-only commits. If you have any
layered data, then the content will change, and the composefs digest
in the base commit will not match the deployed one. This is expected
with such sealed commits though. If you want to layer, either disable
sealing, or create a new sealed ostree commit for the new image.

5 months agoprepare-root: add allow_noent argument to load_variant
Alexander Larsson [Mon, 15 Sep 2025 08:04:59 +0000 (10:04 +0200)]
prepare-root: add allow_noent argument to load_variant

This is a minor preparation for a later change. Instead of
hand-rolling the G_FILE_ERROR_NOENT error check we add
a new allow_noent option.

Additionally, we move the handling of a no commitmeta being
an error to the caller of load_commit_for_deploy(), because
this check will be slightly more complex in the future.

5 months agoMerge pull request #3524 from jlebon/pr/state-overlays-exp
Colin Walters [Thu, 11 Sep 2025 23:20:11 +0000 (19:20 -0400)]
Merge pull request #3524 from jlebon/pr/state-overlays-exp

man/ostree-state-overlay: drop experimental but link to bootc docs

5 months agoman/ostree-state-overlay: drop experimental but link to bootc docs
Jonathan Lebon [Thu, 11 Sep 2025 19:28:34 +0000 (15:28 -0400)]
man/ostree-state-overlay: drop experimental but link to bootc docs

This has baked for long enough now so drop the experimental flag. But do
explain that symlinks are preferred and link to the bootc docs.

6 months agoMerge pull request #3521 from cgwalters/release
Colin Walters [Fri, 5 Sep 2025 21:12:54 +0000 (17:12 -0400)]
Merge pull request #3521 from cgwalters/release

Release 2025.6

6 months agoconfigure: post-release version bump
Colin Walters [Fri, 5 Sep 2025 19:20:40 +0000 (15:20 -0400)]
configure: post-release version bump

6 months agoRelease 2025.6
Colin Walters [Fri, 5 Sep 2025 19:19:33 +0000 (15:19 -0400)]
Release 2025.6

6 months agoMerge pull request #3518 from champtar/remove-mount-cycle
Colin Walters [Fri, 5 Sep 2025 18:46:20 +0000 (14:46 -0400)]
Merge pull request #3518 from champtar/remove-mount-cycle

Rework mounts to fix sysroot.mount umount

6 months agoRevert "Add ostree-shutdown.service: hide /sysroot and make /etc read-only"
Etienne Champetier [Wed, 3 Sep 2025 18:22:39 +0000 (14:22 -0400)]
Revert "Add ostree-shutdown.service: hide /sysroot and make /etc read-only"

Instead of adding a shutdown service, we rework how we create the mounts.
After the 2 previous commits, sysroot.mount umount works, and
systemd-shutdown will take care of remounting etc.mount read-only and
calling sync() as needed.

This reverts commit d0c454c23637dceda6d7395dd2141b564e3efa47.

6 months agoostree-soft-reboot: fix sysroot.mount umount
Etienne Champetier [Wed, 3 Sep 2025 18:12:27 +0000 (14:12 -0400)]
ostree-soft-reboot: fix sysroot.mount umount

The composefs at /run/nextboot uses /sysroot, so systemd fails to
umount sysroot.mount during soft-reboot.
Create a temporary bind-mount, use it to prepare /run/nextboot
and MNT_DETACH it when we are done.

6 months agoostree-prepare-root: avoid mount cycle
Etienne Champetier [Tue, 2 Sep 2025 21:33:00 +0000 (17:33 -0400)]
ostree-prepare-root: avoid mount cycle

Moving the physical root at /sysroot, we end up
with a mount cycle between / and /sysroot, forcing us to use
MS_DETACH during shutdown (d0c454c23637dceda6d7395dd2141b564e3efa47).

We can replace ostree-shutdown.service by reworking how we mount
/sysroot, in short use MS_BIND instead of MS_MOVE.

6 months agoMerge pull request #3517 from jozzsi/3495
Colin Walters [Thu, 4 Sep 2025 12:13:57 +0000 (08:13 -0400)]
Merge pull request #3517 from jozzsi/3495

Move dracut module from 98 ordering to the recommended 50 ordering

6 months agoMove dracut module from 98 ordering to the recommended 50 ordering
Jo Zzsi [Sun, 31 Aug 2025 04:56:10 +0000 (00:56 -0400)]
Move dracut module from 98 ordering to the recommended 50 ordering

In dracut release v108 or later the recommended ordering for out
out of tree modules is 50. The following is a section from dracut
documentation:

> Not using the 50-59 range for out of tree dracut modules will likely
> lead to unintended errors in the initramfs generation process as your
> dracut module will either run too early or too late in the generation process.
> You have been warned.

Fixes: https://github.com/ostreedev/ostree/issues/3495
6 months agoMerge pull request #3516 from cgwalters/remount-shutdown
Etienne Champetier [Fri, 29 Aug 2025 22:27:38 +0000 (18:27 -0400)]
Merge pull request #3516 from cgwalters/remount-shutdown

Add ostree-shutdown.service: hide /sysroot and make /etc read-only

6 months agoAdd ostree-shutdown.service: hide /sysroot and make /etc read-only
Colin Walters [Thu, 28 Aug 2025 17:53:14 +0000 (13:53 -0400)]
Add ostree-shutdown.service: hide /sysroot and make /etc read-only

We have a lot of bind mounts; these are usually set up in the initramfs.
So far during shutdown we've let systemd just try to sort things out
via auto-generated mount units i.e. `sysroot.mount` and `etc.mount`
and so on.

systemd has some special casing for `-.mount` (i.e. `/`) and `etc.mount`
https://github.com/systemd/systemd/blob/e91bfad241799b449df73efc30d833b9c5937001/src/shared/fstab-util.c#L72

However it doesn't special case `/sysroot` - which is currently
an ostree-specific invention (when used in the real root).
We cannot actually unmount `/sysroot` while it's in use, and it
is because `/etc` is a bind mount into it. And we can't tear
down `/etc` because it's just expected that e.g. pid 1 and other
things hold open references to it - until things finally
transition into systemd-shutdown.

What we can do though is explicitly detach it during the shutdown
phase; this ensures that systemd won't try to clean it up then,
suppressing errors about its inability to do so.

While we're here, let's also remount `/etc` read-only; while
systemd itself will try to do so during systemd-shutdown.
Per comments if this service fails, it's a bug in something
else to be fixed.

Closes: https://github.com/ostreedev/ostree/issues/3513
Signed-off-by: Colin Walters <walters@verbum.org>
6 months agoMerge pull request #3515 from HastD/xattrs-double-free
Colin Walters [Fri, 29 Aug 2025 20:07:17 +0000 (16:07 -0400)]
Merge pull request #3515 from HastD/xattrs-double-free

fix: double free in checkout_tree_at_recurse

6 months agofix: double free in checkout_tree_at_recurse
Daniel Hast [Fri, 29 Aug 2025 18:17:15 +0000 (14:17 -0400)]
fix: double free in checkout_tree_at_recurse

Both `xattrs` and `modified_xattrs` are declared with `g_autoptr`, but
`xattrs` is later simply assigned to be equal to `modified_xattrs`,
meaning the automatic cleanup is a double-free.

This is fixed by instead using `g_steal_pointer` to assign the old value
of `xattrs` to a temporary variable, which is used to create the new
value.

I believe this is the cause of issue #3303, and this should fix #3303.
(I can consistently reproduce the issue by attempting to deploy a
rechunked image with bootc, and with this patch, the issue no longer
occurs and the deployment succeeds.)

Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
6 months agoMerge pull request #3514 from cgwalters/finalize-needs-etc
Etienne Champetier [Wed, 27 Aug 2025 17:25:17 +0000 (13:25 -0400)]
Merge pull request #3514 from cgwalters/finalize-needs-etc

ostree-finalize-staged.service: RequiresMountsFor=/etc

6 months agoostree-finalize-staged.service: RequiresMountsFor=/etc
Colin Walters [Wed, 27 Aug 2025 14:38:11 +0000 (10:38 -0400)]
ostree-finalize-staged.service: RequiresMountsFor=/etc

I've seen in some cases systemd try to unmount /etc quite early
and then fail because it's in use.

It's confusing because I don't see this in all scenarios.
But regardless, in the situations where it does occur,
this fixes it.

Signed-off-by: Colin Walters <walters@verbum.org>
6 months agoMerge pull request #3512 from champtar/OSTREE_SUPPRESS_SYNCFS
Colin Walters [Tue, 26 Aug 2025 15:00:12 +0000 (11:00 -0400)]
Merge pull request #3512 from champtar/OSTREE_SUPPRESS_SYNCFS

libostree: remove OSTREE_SUPPRESS_SYNCFS

6 months agolibostree: remove OSTREE_SUPPRESS_SYNCFS
Etienne Champetier [Tue, 26 Aug 2025 13:10:21 +0000 (09:10 -0400)]
libostree: remove OSTREE_SUPPRESS_SYNCFS

This workaround was needed for the old valgrind version in EL 7

6 months agoMerge pull request #3509 from cgwalters/sysroot-sync-repo
Colin Walters [Mon, 25 Aug 2025 21:01:05 +0000 (17:01 -0400)]
Merge pull request #3509 from cgwalters/sysroot-sync-repo

Deduplicate repo+sysroot syncfs logic

6 months agoMerge pull request #3510 from cgwalters/release
Colin Walters [Mon, 25 Aug 2025 15:07:26 +0000 (11:07 -0400)]
Merge pull request #3510 from cgwalters/release

Release 2025.5

6 months agoDeduplicate repo+sysroot syncfs logic
Colin Walters [Thu, 21 Aug 2025 09:57:03 +0000 (11:57 +0200)]
Deduplicate repo+sysroot syncfs logic

This is a followup to https://github.com/ostreedev/ostree/pull/3504/commits/6e5a27a29d33d50a2a4380c406405435d919b6b4
which I believe is correct as is. However, we already have a file
descriptor open for the ostree repo, which *must* be on
the same filesystem as `/sysroot/ostree` (the deployment
code forces hardlinking today).

It's hence cleaner to reuse that extant fd instead of opening
a new one - we know we did writes to that fd.

But going farther here, there already is logic to use syncfs
for the repo when downloading objects (in a common case
we actually syncfs twice).

Since these are really the same operation, unify them:

- Add journaling to the repo one syncfs case
- Change the sysroot case to just call it
- Since we log consistently to the journal for all syncfs/fsfreeze
  operations now, drop the SyncStats bits which was a way
  to add info about that to a later journal message

Additionally, let's add an extra check when we're
opening the repo that it's on the same device just on general
principle.

Signed-off-by: Colin Walters <walters@verbum.org>
6 months agoconfigure: Post-release version bump
Colin Walters [Mon, 25 Aug 2025 12:49:34 +0000 (08:49 -0400)]
configure: Post-release version bump

Signed-off-by: Colin Walters <walters@verbum.org>
6 months agoRelease 2025.5
Colin Walters [Mon, 25 Aug 2025 12:46:57 +0000 (08:46 -0400)]
Release 2025.5

Signed-off-by: Colin Walters <walters@verbum.org>
6 months agoMerge pull request #3507 from cgwalters/aboot-chdir
Joseph Marrero Corchado [Thu, 21 Aug 2025 16:08:02 +0000 (12:08 -0400)]
Merge pull request #3507 from cgwalters/aboot-chdir

aboot: Use fd and not absolute path

6 months agoMerge pull request #3508 from cgwalters/switchroot-journal
Joseph Marrero Corchado [Thu, 21 Aug 2025 14:04:48 +0000 (10:04 -0400)]
Merge pull request #3508 from cgwalters/switchroot-journal

prepare-root: Log to journal, not stdout

6 months agoprepare-root: Log to journal, not stdout
Colin Walters [Wed, 20 Aug 2025 13:51:10 +0000 (15:51 +0200)]
prepare-root: Log to journal, not stdout

Since this can now be used as part of the shared library for
soft reboots, we shouldn't have a library write to stdout.
I noticed this in bootc. Use the journal instead.

Signed-off-by: Colin Walters <walters@verbum.org>
6 months agoaboot: Use fd and not absolute path
Colin Walters [Tue, 19 Aug 2025 13:16:35 +0000 (15:16 +0200)]
aboot: Use fd and not absolute path

Motivated by https://github.com/bootc-dev/bootc/pull/1532/commits/6d2eb2aaa92e23f434c47e3d0ebadc0307d45289

(We need to have a shared helper for this stuff at some point)

6 months agoMerge pull request #3506 from cgwalters/adapt-cosa
Colin Walters [Tue, 19 Aug 2025 13:10:24 +0000 (15:10 +0200)]
Merge pull request #3506 from cgwalters/adapt-cosa

ci: Adapt to cosa change

6 months agoci: Adapt to cosa change
Colin Walters [Tue, 19 Aug 2025 09:47:53 +0000 (11:47 +0200)]
ci: Adapt to cosa change

It seems to have stopped building qemu by default.

Signed-off-by: Colin Walters <walters@verbum.org>
6 months agoMerge pull request #3504 from champtar/syncfs-ostree
Colin Walters [Tue, 19 Aug 2025 07:10:29 +0000 (09:10 +0200)]
Merge pull request #3504 from champtar/syncfs-ostree

deploy: call syncfs() for /ostree instead of /

6 months agodeploy: call syncfs() for /ostree instead of /
Etienne Champetier [Mon, 18 Aug 2025 21:41:37 +0000 (17:41 -0400)]
deploy: call syncfs() for /ostree instead of /

In full_system_sync we were calling syncfs(/) expecting
all the recent modification in /ostree to be synced to disk.
With / now being composefs, syncfs(/) is a noop, so call
syncfs(/ostree) as that is what we really want.

7 months agoMerge pull request #3494 from alexlarsson/remove-aboot-dead-code
Colin Walters [Wed, 6 Aug 2025 15:40:45 +0000 (11:40 -0400)]
Merge pull request #3494 from alexlarsson/remove-aboot-dead-code

deploy: Remove some dead aboot code

7 months agodeploy: Remove some dead aboot code
Alexander Larsson [Wed, 6 Aug 2025 13:06:25 +0000 (15:06 +0200)]
deploy: Remove some dead aboot code

The code in get_kernel_from_tree_usrlib_modules() that checks for an
"aboot.cfg" does nothing with it (and in fact may leak the fd in case
its there). In practice, /usr/lib/modules never has an aboot.cfg, so
this is just completely dead code.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
7 months agoMerge pull request #3493 from alexlarsson/fix-aboot-updates
Colin Walters [Wed, 6 Aug 2025 12:25:53 +0000 (08:25 -0400)]
Merge pull request #3493 from alexlarsson/fix-aboot-updates

deploy: Fix path to aboot.cfg in BLS files

7 months agodeploy: Fix path to aboot.cfg in BLS files
Alexander Larsson [Wed, 6 Aug 2025 10:16:34 +0000 (12:16 +0200)]
deploy: Fix path to aboot.cfg in BLS files

The change in https://github.com/ostreedev/ostree/pull/3413/ was meant
to change when the abootcfg option is set in the BLS file.  However,
it also changed the value of this key, using the wrong directory
(bootcsumdir instead of /usr/lib/ostree-boot).

This means that during update, aboot-update gets the wrong path to the
config and cannot correctly write the aboot partition.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
7 months agoMerge pull request #3487 from cgwalters/soft-reboot-boot-mnt
Colin Walters [Thu, 24 Jul 2025 17:21:55 +0000 (13:21 -0400)]
Merge pull request #3487 from cgwalters/soft-reboot-boot-mnt

soft-reboot: Also handle /boot

7 months agosoft-reboot: Also handle /boot
Colin Walters [Tue, 22 Jul 2025 21:38:41 +0000 (17:38 -0400)]
soft-reboot: Also handle /boot

Closes: https://github.com/ostreedev/ostree/issues/3486
Signed-off-by: Colin Walters <walters@verbum.org>
7 months agoswitchroot: Refactor /boot mounting into helper function
Colin Walters [Tue, 22 Jul 2025 20:41:49 +0000 (16:41 -0400)]
switchroot: Refactor /boot mounting into helper function

So it can be shared with soft reboots.

Signed-off-by: Colin Walters <walters@verbum.org>
7 months agoMerge pull request #3485 from cgwalters/test-boot-bind
Colin Walters [Thu, 24 Jul 2025 12:56:04 +0000 (08:56 -0400)]
Merge pull request #3485 from cgwalters/test-boot-bind

tests: verify /boot mount with prepare root

7 months agotests-unit-container: Verify /boot mount point
Colin Walters [Tue, 22 Jul 2025 21:17:05 +0000 (17:17 -0400)]
tests-unit-container: Verify /boot mount point

Prep for further changes.

Signed-off-by: Colin Walters <walters@verbum.org>
7 months agojustfile: Add a target to iterate on container unit tests quickly
Colin Walters [Tue, 22 Jul 2025 21:16:39 +0000 (17:16 -0400)]
justfile: Add a target to iterate on container unit tests quickly

We need to split these into two container builds probably...

7 months agotests: Fix negative check for transient etc
Colin Walters [Tue, 22 Jul 2025 20:55:09 +0000 (16:55 -0400)]
tests: Fix negative check for transient etc

This test was passing for the wrong reason. Just noticed when
reviewing.

7 months agoMerge pull request #3484 from cgwalters/bump-sys
Colin Walters [Tue, 22 Jul 2025 15:36:01 +0000 (11:36 -0400)]
Merge pull request #3484 from cgwalters/bump-sys

Two rust patches

7 months agorust: Fix a few warnings
Colin Walters [Tue, 22 Jul 2025 14:52:45 +0000 (10:52 -0400)]
rust: Fix a few warnings

- Unused imports because we weren't actually exporting the structs
  from those modules
- glib prelude is empty now?
- mount namespace usage is conditional

Signed-off-by: Colin Walters <walters@verbum.org>
7 months agorust: Bump sys crate version too
Colin Walters [Tue, 22 Jul 2025 14:48:28 +0000 (10:48 -0400)]
rust: Bump sys crate version too

Should have happened in the other PR.

7 months agoMerge pull request #3479 from cgwalters/test-etc-transient
Colin Walters [Tue, 22 Jul 2025 14:07:09 +0000 (10:07 -0400)]
Merge pull request #3479 from cgwalters/test-etc-transient

tests: Add a test case for etc.transient

7 months agoMerge pull request #3482 from cgwalters/release-rust
Colin Walters [Tue, 22 Jul 2025 14:03:53 +0000 (10:03 -0400)]
Merge pull request #3482 from cgwalters/release-rust

rust: Regenerate and release 0.20.4

7 months agoMerge pull request #3481 from cgwalters/release
Colin Walters [Tue, 22 Jul 2025 14:03:30 +0000 (10:03 -0400)]
Merge pull request #3481 from cgwalters/release

Release 2025.4

7 months agoconfigure: post-release version bump
Colin Walters [Mon, 21 Jul 2025 20:50:24 +0000 (16:50 -0400)]
configure: post-release version bump

7 months agoRelease 2025.4
Colin Walters [Mon, 21 Jul 2025 20:46:51 +0000 (16:46 -0400)]
Release 2025.4

7 months agorust: Regenerate and release 0.20.4
Colin Walters [Mon, 21 Jul 2025 21:01:04 +0000 (17:01 -0400)]
rust: Regenerate and release 0.20.4

This ensures we actually pick up the changes for `Since`.

7 months agotests: Add a test case for etc.transient
Colin Walters [Mon, 21 Jul 2025 20:36:50 +0000 (16:36 -0400)]
tests: Add a test case for etc.transient

This would have caught https://github.com/ostreedev/ostree/issues/3476

7 months agoMerge pull request #3473 from cgwalters/root-transient-ro
Colin Walters [Mon, 21 Jul 2025 16:45:51 +0000 (12:45 -0400)]
Merge pull request #3473 from cgwalters/root-transient-ro

Add root.transient-ro

7 months agoMerge pull request #3477 from wsabransky/patch-1
Colin Walters [Mon, 21 Jul 2025 01:21:59 +0000 (21:21 -0400)]
Merge pull request #3477 from wsabransky/patch-1

ostree-prepare-root: remove duplicate transient directory

7 months agoostree-prepare-root: remove duplicate transient directory
Will Sabransky [Sun, 20 Jul 2025 22:05:44 +0000 (17:05 -0500)]
ostree-prepare-root: remove duplicate transient directory

Only create the transient etc directory once to prevent failures due to directory existence.

7 months agoMerge pull request #3475 from cgwalters/fix-since-annotations
Colin Walters [Sun, 20 Jul 2025 19:51:55 +0000 (15:51 -0400)]
Merge pull request #3475 from cgwalters/fix-since-annotations

Fix since annotations && update rust bindings

7 months agorust-bindings: Regenerate with updated gir
Colin Walters [Fri, 18 Jul 2025 19:11:15 +0000 (15:11 -0400)]
rust-bindings: Regenerate with updated gir

In particular we had a conflict as the previous bindings
were generated with an old version of the C APIs.

7 months agosysroot: Fix Since: for soft reboot APIs
Colin Walters [Fri, 18 Jul 2025 19:03:27 +0000 (15:03 -0400)]
sysroot: Fix Since: for soft reboot APIs

We should really have a CI gate for this...

7 months agoAdd root.transient-ro
Colin Walters [Wed, 16 Jul 2025 15:08:00 +0000 (11:08 -0400)]
Add root.transient-ro

An example use case for this is having privileged code
add dynamic new toplevel mountpoints (that don't persist across
reboots/upgrades), while still keeping the rootfs readonly
for processes by default.

Closes: https://github.com/ostreedev/ostree/issues/3471
Signed-off-by: Colin Walters <walters@verbum.org>
7 months agoMerge pull request #3472 from cgwalters/root-transient-ro-prep
Colin Walters [Wed, 16 Jul 2025 20:07:12 +0000 (16:07 -0400)]
Merge pull request #3472 from cgwalters/root-transient-ro-prep

Prep patches for rootfs.transient-ro

7 months agoprepare-root: Move root.transient parsing rootfs parsing
Colin Walters [Wed, 16 Jul 2025 17:18:58 +0000 (13:18 -0400)]
prepare-root: Move root.transient parsing rootfs parsing

This deduplicates more code between main boot and soft reboot,
and is prep for supporting `rootfs.transient-ro = true`.

7 months agoprepare-root: Rename `enabled` -> `composefs_enabled`
Colin Walters [Wed, 16 Jul 2025 16:56:49 +0000 (12:56 -0400)]
prepare-root: Rename `enabled` -> `composefs_enabled`

Prep for moving more functionality there, it's really about
the rootfs, not just composefs.

Signed-off-by: Colin Walters <walters@verbum.org>
7 months agoprepare-root: Rename rootfs variables
Colin Walters [Wed, 16 Jul 2025 16:56:49 +0000 (12:56 -0400)]
prepare-root: Rename rootfs variables

Prep for moving more functionality there, it's really about
the rootfs, not just composefs.

Signed-off-by: Colin Walters <walters@verbum.org>
7 months agoprepare-root: Rename rootfs loading functions
Colin Walters [Wed, 16 Jul 2025 16:56:49 +0000 (12:56 -0400)]
prepare-root: Rename rootfs loading functions

Prep for moving more functionality there, it's really about
the rootfs, not just composefs.

7 months agoMerge pull request #3470 from cgwalters/build-dist-test-scripts
Colin Walters [Tue, 15 Jul 2025 11:55:26 +0000 (07:55 -0400)]
Merge pull request #3470 from cgwalters/build-dist-test-scripts

build-sys: Always EXTRA_DIST test scripts

7 months agobuild-sys: Always EXTRA_DIST test scripts
Colin Walters [Mon, 14 Jul 2025 19:36:42 +0000 (15:36 -0400)]
build-sys: Always EXTRA_DIST test scripts

Fixes the case of doing `make dist` without some
build features enabled.

Closes: https://github.com/ostreedev/ostree/issues/3469
Signed-off-by: Colin Walters <walters@verbum.org>
8 months agoMerge pull request #3455 from jmarrero/bindings
Colin Walters [Thu, 10 Jul 2025 16:48:50 +0000 (12:48 -0400)]
Merge pull request #3455 from jmarrero/bindings

rust: Add v2025_3 feature and bump versions

8 months agoMerge pull request #3468 from jmarrero/release-20253
Joseph Marrero Corchado [Thu, 10 Jul 2025 16:23:42 +0000 (12:23 -0400)]
Merge pull request #3468 from jmarrero/release-20253

Release 2025.3

8 months agoconfigure: post-release version bump
Joseph Marrero Corchado [Thu, 10 Jul 2025 14:04:16 +0000 (10:04 -0400)]
configure: post-release version bump

8 months agoRelease 2025.3
Joseph Marrero Corchado [Thu, 10 Jul 2025 14:02:00 +0000 (10:02 -0400)]
Release 2025.3

8 months agoMerge pull request #3310 from igoropaniuk/boot_count
Colin Walters [Thu, 10 Jul 2025 11:24:06 +0000 (07:24 -0400)]
Merge pull request #3310 from igoropaniuk/boot_count

sysroot: Support boot counting for boot entries

8 months agosysroot: Support boot counting for boot entries
Igor Opaniuk [Wed, 11 Sep 2024 16:03:10 +0000 (18:03 +0200)]
sysroot: Support boot counting for boot entries

Add support for boot counting for bootloader entries [1].
The boot counting data is stored in the name of the boot loader entry.
A boot loader entry file name may contain a plus (+) followed by a number.
This may optionally be followed by a minus (-) followed by a second number.
The dot (.) and file name suffix (conf or efi) must immediately follow.

The feature is enabled via sysroot configuration:
[sysroot]
boot-counting-tries=3

Testing:
$ ostree admin deploy 91fc19319be9e79d07159303dff125f40f10e5c25614630dcbed23d95e36f907
Copying /etc changes: 2 modified, 3 removed, 4 added
bootfs is sufficient for calculated new size: 0 bytes
Transaction complete; bootconfig swap: yes; bootversion: boot.0.1, deployment count change: 1

$ ls /boot/loader/entries
ostree-1.conf  ostree-2+3.conf

[1] https://uapi-group.org/specifications/specs/boot_loader_specification/#boot-counting
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Signed-off-by: Colin Walters <walters@verbum.org>
8 months agoMerge pull request #3467 from cgwalters/config-set-validate
Joseph Marrero Corchado [Thu, 10 Jul 2025 02:24:04 +0000 (22:24 -0400)]
Merge pull request #3467 from cgwalters/config-set-validate

repo: Add new API to write config with reload+validation

8 months agoMerge pull request #3465 from cgwalters/soft-reboot-kargs-check
Colin Walters [Wed, 9 Jul 2025 22:30:10 +0000 (18:30 -0400)]
Merge pull request #3465 from cgwalters/soft-reboot-kargs-check

Soft reboot kargs check

8 months agorepo: Add new API to write config with reload+validation
Colin Walters [Wed, 9 Jul 2025 22:04:08 +0000 (18:04 -0400)]
repo: Add new API to write config with reload+validation

The `ostree config set` CLI should really disallow
writing invalid values. To implement that, add a new
API that also *reloads* to the new config, and
rolls back on failure.

Closes: https://github.com/ostreedev/ostree/issues/1827
Signed-off-by: Colin Walters <walters@verbum.org>
8 months agosoft-reboot: Check for kernel argument changes
Colin Walters [Wed, 9 Jul 2025 19:21:56 +0000 (15:21 -0400)]
soft-reboot: Check for kernel argument changes

This closes a drift gap possibility.

Signed-off-by: Colin Walters <walters@verbum.org>
8 months agoMerge pull request #3463 from cgwalters/ci-bootc-c10s
Colin Walters [Wed, 9 Jul 2025 18:01:50 +0000 (14:01 -0400)]
Merge pull request #3463 from cgwalters/ci-bootc-c10s

ci: Expand bootc testing to cover c10s

8 months agorust-bindings: update for soft-reboot
Joseph Marrero Corchado [Mon, 30 Jun 2025 19:21:34 +0000 (15:21 -0400)]
rust-bindings: update for soft-reboot

8 months agorust: Add v2025_3 feature and bump versions
Joseph Marrero Corchado [Fri, 27 Jun 2025 15:16:57 +0000 (11:16 -0400)]
rust: Add v2025_3 feature and bump versions

8 months agotests: Verify soft reboot with changed kernel state
Colin Walters [Wed, 9 Jul 2025 17:28:18 +0000 (13:28 -0400)]
tests: Verify soft reboot with changed kernel state

8 months agoMerge pull request #3464 from cgwalters/man-drop-authorgroup
Colin Walters [Wed, 9 Jul 2025 13:51:20 +0000 (09:51 -0400)]
Merge pull request #3464 from cgwalters/man-drop-authorgroup

docs: Remove <authorgroup>

8 months agodocs: Remove <authorgroup>
Colin Walters [Tue, 8 Jul 2025 22:26:26 +0000 (18:26 -0400)]
docs: Remove <authorgroup>

We've just been copy pasting this; for some commands it's
true, but others have been written by other people. Most of
the commands just call into the library code which is written
by various people.

Because it isn't really accurate, just drop it.

Signed-off-by: Colin Walters <walters@verbum.org>
8 months agoMerge pull request #3460 from cgwalters/soft-reboot-followups3
Colin Walters [Tue, 8 Jul 2025 17:03:34 +0000 (13:03 -0400)]
Merge pull request #3460 from cgwalters/soft-reboot-followups3

soft-reboot: Many changes

8 months agosoft-reboot: Many changes
Colin Walters [Mon, 30 Jun 2025 21:07:18 +0000 (17:07 -0400)]
soft-reboot: Many changes

- Add --reboot and --reset arguments
- Don't compile on centos stream 9 (missing `open_tree` glibc wrapper)
  as the functionality isn't supported by systemd there; that said
  we should also do dynamic detection
- Fix /sysroot writability
- If we target as soft reboot a deployment
  *other* than the staged one, automatically clear the staged
  deployment as otherwise the semantics are too confusing.
- Rename the APIs so they all say `soft_reboot` and not `next_root`

Signed-off-by: Colin Walters <walters@verbum.org>
8 months agoci: Expand bootc testing to cover c10s
Colin Walters [Tue, 8 Jul 2025 00:50:45 +0000 (20:50 -0400)]
ci: Expand bootc testing to cover c10s

Because it's an active development target.

Signed-off-by: Colin Walters <walters@verbum.org>
8 months agoMerge pull request #3461 from cgwalters/sysroot-deploy-cleanup
Colin Walters [Mon, 7 Jul 2025 14:58:54 +0000 (10:58 -0400)]
Merge pull request #3461 from cgwalters/sysroot-deploy-cleanup

deploy: Don't create deployment object before deploying

8 months agodeploy: Don't create deployment object before deploying
Colin Walters [Tue, 1 Jul 2025 18:38:10 +0000 (14:38 -0400)]
deploy: Don't create deployment object before deploying

Just pass the bits of the new deployment we want down into the
checkout function. This lets us reuse the common helper
to init a deployment which now always captures the device/inode.

Followup from previous commit.

Signed-off-by: Colin Walters <walters@verbum.org>
8 months agoMerge pull request #3456 from cgwalters/soft-reboot-followups2
Colin Walters [Tue, 1 Jul 2025 18:20:23 +0000 (14:20 -0400)]
Merge pull request #3456 from cgwalters/soft-reboot-followups2

sysroot: Remove now-spurious assertion change from soft reboot changes

8 months agoMerge pull request #3459 from cgwalters/deployments-cache-devino
Colin Walters [Tue, 1 Jul 2025 18:17:05 +0000 (14:17 -0400)]
Merge pull request #3459 from cgwalters/deployments-cache-devino

sysroot: Cache deployment device/inode